package com.example.pre.service.impl;

import java.util.Collection;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.pre.dao.FlowTemplatesDepartmentDao;
import com.example.pre.model.FlowTemplatesDepartment;
import com.example.pre.service.FlowTemplateDepartmentService;

/*
 * 流程模板-部门service层实现类
 */
@Service
public class FlowTemplatesDepartmentServiceImpl implements FlowTemplateDepartmentService {

	@Autowired
	private FlowTemplatesDepartmentDao flowTemplatesDepartmentDao;

	@Override
	public FlowTemplatesDepartment get(int id) {
		return flowTemplatesDepartmentDao.get(id);
	}

	@Override
	public Collection<FlowTemplatesDepartment> getAll() {
		return flowTemplatesDepartmentDao.listByCondition(null);
	}

	@Override
	public boolean update(FlowTemplatesDepartment m) {
		return flowTemplatesDepartmentDao.update(m) == 1;
	}

	@Override
	public boolean delete(int id) {
		return flowTemplatesDepartmentDao.delete(id) == 1;
	}

	@Override
	public boolean create(FlowTemplatesDepartment m) {
		return flowTemplatesDepartmentDao.create(m) == 1;
	}

	@Override
	public Collection<FlowTemplatesDepartment> listByCondition(Map<String, Object> whereColumn) {
		return flowTemplatesDepartmentDao.listByCondition(whereColumn);
	}

	@Override
	public int countByCondition(Map<String, Object> whereColumn) {
		return flowTemplatesDepartmentDao.countByCondition(whereColumn);
	}

}
